// Icon mapping utilities for hotspot sources and stats

export function getSourceIcon(source: string): string {
  if (!source) return '/微博.svg';
  if (source.includes('微博')) return '/微博.svg';
  if (source.includes('头条')) return '/今日头条.svg';
  if (source.includes('公众号') || source.includes('微信公众号')) return '/微信公众号.svg';
  if (source.includes('抖音')) return '/抖音.svg';
  return '/微博.svg';
}

export function getStatsIcon(stats: any): string {
  if (!stats) return '/热度.svg';
  const statsStr = String(stats);
  if (statsStr.includes('讨论')) return '/热度.svg';
  if (statsStr.includes('阅读')) return '/ico_阅读量.svg';
  if (statsStr.includes('播放')) return '/播放.svg';
  return '/热度.svg';
}
